<!--
 * @Author: xuhong
 * @Date: 2020-04-30 08:53:39
 * @LastEditTime: 2020-05-07 10:20:58
 * @FilePath: \my-admin\src\pages\Administrator\news.vue
 -->
 <template>
    <div class="news">
        <div class="news-header flex justify-conter">
            <div class="news-header-left">
                <el-input v-model="articleTitle" placeholder="请输入标题"></el-input>
            </div>
            <div class="news-header-right flex justify-end flex-sub">
                <el-button type="danger" @click="toPathArticle">创建文章</el-button>
            </div>
        </div>
        <div class="new-content margin-top">
            <el-table
                :data="newObj"
                style="width: 100%"
            >
                <el-table-column
                    prop="articleTime"
                    label="创建时间"
                    while="140">
                    <template slot-scope="scope">{{scope.row.articleTime}}</template>
                </el-table-column>
                <el-table-column
                    prop="articleType"
                    label="类型"
                    while="80">
                </el-table-column>
                <el-table-column
                    prop="articleWriter"
                    label="作者"
                    while="120">
                </el-table-column>
                <el-table-column
                    prop="articleTitle"
                    label="标题"
                    while="210">
                </el-table-column>
                <el-table-column
                    prop="articleTitle"
                    label="标题"
                    while="160">
                </el-table-column>
                <el-table-column label="操作">
                    <template slot-scope="scope">
                        <el-button
                        size="mini"
                        @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
                        <el-button
                        size="mini"
                        type="danger"
                        @click="handleDelete(scope.$index, scope.row)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
        </div>
    </div>
 </template>
 
 <script>
 export default {
     data(){
         return {
             articleTitle:"",
             newObj:[
                {
                    articleTime:{time:'2020-02-06'}
                },{
                    articleTime:'2020-02-06'
                }
             ]
         }
     },
     methods:{
         toPathArticle(){
             this.$router.push({
                path: '/articleCompile',
            
            })
         }
     }
 }
 </script>
 
 <style>
 .el-table .cell {
    text-align: center;
}
 </style>